Game device, control method for a game device, and non-transitory information storage medium

ABSTRACT

A position acquiring unit acquires, from a position information generating unit, three-dimensional position information relating to a position of a player, the position information generating unit generating the three-dimensional position information based on a photographed image acquired from a photographing unit for photographing the player and depth information relating to a distance between a measurement reference position of a depth measuring unit and the player. A determination unit determines whether or not the position of the player is contained in a determination subject space. A game processing execution unit executes game processing based on a result of the determination made by the determination unit. A determination subject space changing unit changes, in a case where it is determined that the position of the player is not contained in the determination subject space, a position of the determination subject space based on the position of the player.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority from Japanese applicationJP2010-059465 filed on Mar. 16, 2010, the content of which is herebyincorporated by reference into this application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a game device, a control method for agame device, and a non-transitory information storage medium.

2. Description of the Related Art

There is known a game in which an image obtained by photographing aplayer with a camera is used. For example, JP 2005-287830 A describesthe following technology. That is, an image obtained by photographingthe player and a reference game image stored in advance are synthesized,and the synthesized image is displayed on a monitor, to thereby enablethe player to understand a movement that the player should make in thegame.

SUMMARY OF THE INVENTION

In recent years, studies have been made on a game in which, in additionto the image obtained by photographing the player, distance informationacquired by using an infrared sensor (for example, distance between theplayer and the infrared sensor) is used. For example, based on the imageobtained by photographing the player and the distance information, adetermination can be made as to a position and a movement of the player.

In such a game, the player moves their (his/her) body to play the game,and therefore the standing position of the player is sometimesdisplaced. As a result, there is a risk of the player hitting anobstacle in their surroundings. To address this, it is conceivable tonarrow the photographing range of a camera so that the player does notgo out of a predetermined range. However, in this case, the player ismore liable to go out of the photographing range, and hence there is arisk that some problem will occur to the gameplay of the player.

The present invention has been made in view of the above-mentionedproblems, and therefore has an object to provide a game device, acontrol method for a game device, and a non-transitory informationstorage medium, which are capable of dealing with displacement inposition of a player during gameplay.

In order to solve the above-mentioned problems, a game device accordingto the present invention includes: position acquiring means foracquiring, from position information generating means, three-dimensionalposition information relating to a position of a player in athree-dimensional space, the position information generating meansgenerating the three-dimensional position information based on aphotographed image acquired from photographing means for photographingthe player and depth information relating to a distance between ameasurement reference position of depth measuring means and the player;determination means for determining whether or not the position of theplayer in the three-dimensional space is contained in a determinationsubject space; game processing execution means for executing gameprocessing based on a result of the determination made by thedetermination means; and determination subject space changing means forchanging, in a case where it is determined that the position of theplayer in the three-dimensional space is not contained in thedetermination subject space, a position of the determination subjectspace based on the position of the player in the three-dimensionalspace.

Further, a control method for a game device according to the presentinvention includes: a position acquiring step of acquiring, fromposition information generating means, three-dimensional positioninformation relating to a position of a player in a three-dimensionalspace, the position information generating means generating thethree-dimensional position information based on a photographed imageacquired from photographing means for photographing the player and depthinformation relating to a distance between a measurement referenceposition of depth measuring means and the player; a determination stepof determining whether or not the position of the player in thethree-dimensional space is contained in a determination subject space; agame processing execution step of executing game processing based on aresult of the determination made in the determination step; and adetermination subject space changing step of changing, in a case whereit is determined that the position of the player in thethree-dimensional space is not contained in the determination subjectspace, a position of the determination subject space based on theposition of the player in the three-dimensional space.

Further, a program according to the present invention causes a computerto function as a game device including: position acquiring means foracquiring, from position information generating means, three-dimensionalposition information relating to a position of a player in athree-dimensional space, the position information generating meansgenerating the three-dimensional position information based on aphotographed image acquired from photographing means for photographingthe player and depth information relating to a distance between ameasurement reference position of depth measuring means and the player;determination means for determining whether or not the position of theplayer in the three-dimensional space is contained in a determinationsubject space; game processing execution means for executing gameprocessing based on a result of the determination made by thedetermination means; and determination subject space changing means forchanging, in a case where it is determined that the position of theplayer in the three-dimensional space is not contained in thedetermination subject space, a position of the determination subjectspace based on the position of the player in the three-dimensionalspace.

Further, a non-transitory computer-readable information storage mediumaccording to the present invention is a non-transitory computer-readableinformation storage medium having the above-mentioned program recordedthereon.

According to the present invention, it is possible to deal with thedisplacement in position of the player during gameplay.

Further, according to one aspect of the present invention, thedetermination subject space changing means includes: means fordetermining whether or not a state in which the position of the playerin the three-dimensional space is not contained in the determinationsubject space has continued for a reference period; and means forchanging the position of the determination subject space in a case wherethe state in which the position of the player in the three-dimensionalspace is not contained in the determination subject space has continuedfor the reference period.

Further, according to one aspect of the present invention, the gamedevice further includes display control means for causing display meansto display a game screen containing a game character and a focused areahaving lightness thereof set higher than lightness of another area, inwhich the display control means includes means for controllingpositional relation between a display position of the game character anda display position of the focused area based on a positional relationbetween the position of the player in the three-dimensional space andthe determination subject space.

Further, according to one aspect of the present invention, the gamedevice further includes display control means for causing display meansto display a game screen containing a first game character and a secondgame character, in which the display control means includes means forcontrolling a positional relation between a display position of thefirst game character and a display position of the second game characterbased on a positional relation between the position of the player in thethree-dimensional space and the determination subject space.

BRIEF DESCRIPTION OF THE DRAWINGS

In the accompanying drawings:

FIG. 1 is a diagram illustrating a positional relation among a positiondetecting device, a game device, and a player;

FIG. 2 is a diagram illustrating an example of a photographed imagegenerated by a CCD camera;

FIG. 3 is a diagram for describing a method of measuring a depth of theplayer, which is performed by an infrared sensor;

FIG. 4 is a diagram illustrating an example of a depth image acquired bythe infrared sensor;

FIG. 5 is a diagram illustrating an example of three-dimensionalposition information generated by the position detecting device;

FIG. 6 is a diagram illustrating a position of the player, which isidentified by the three-dimensional position information;

FIG. 7 is a diagram illustrating a space to be photographed by theposition detecting device;

FIG. 8 is a diagram illustrating an example of a game screen displayedby the game device;

FIG. 9 is a diagram illustrating, as an example, the game screendisplayed by the game device in a case where the player has stepped outof a determination subject space;

FIG. 10 is a diagram illustrating the position detecting device and theplayer viewed from an Xw-Zw plane;

FIG. 11 is an example of the game screen displayed in the case where theplayer has stepped out of the determination subject space;

FIG. 12 is a diagram illustrating the position detecting device and theplayer viewed from an Xw-Yw plane;

FIG. 13 is an example of the game screen displayed in the case where theplayer has stepped out of the determination subject space;

FIG. 14 is a diagram illustrating a hardware configuration of theposition detecting device;

FIG. 15 is a diagram illustrating a hardware configuration of the gamedevice;

FIG. 16 is a functional block diagram illustrating a group of functionsto be implemented on the game device;

FIG. 17 is a diagram illustrating an example of reference actioninformation;

FIG. 18 is a diagram illustrating an example of action determinationcriterion information;

FIG. 19 is a flow chart illustrating an example of processing to beexecuted on the game device;

FIG. 20 is a diagram illustrating the determination subject space afterchange;

FIG. 21 is a diagram illustrating a case where a display position of animage contained in the game screen has been changed;

FIG. 22 is a diagram illustrating another example of the game screen;

FIG. 23 is a diagram illustrating an example of the game screen;

FIG. 24 is a diagram illustrating an example of the game screen; and

FIG. 25 is a diagram illustrating a case where the display position ofan image contained in the game screen has been changed.

DETAILED DESCRIPTION OF THE INVENTION First Embodiment

Hereinafter, detailed description is given of an example of anembodiment of the present invention with reference to the drawings.

A game device according to the embodiment of the present invention isimplemented by, for example, a home-use game machine (stationary gamemachine), a portable game machine, a mobile phone, a personal digitalassistant (PDA), or a personal computer. In this specification,description is given of a case where the game device according to theembodiment of the present invention is implemented by a home-use gamemachine.

1-1. General Outline

FIG. 1 is a diagram illustrating a positional relation among a positiondetecting device 1, a game device 20, and a player 100. As illustratedin FIG. 1, the player 100 is positioned, for example, in front of theposition detecting device 1. The position detecting device 1 and thegame device 20 are connected to each other so as to be able tocommunicate data therebetween. Further, the player 100 plays a game in,for example, a living room where items of furniture F are placed.

The position detecting device 1 generates information relating to aposition of the player 100 based on an image acquired by photographingthe player 100 and information relating to a distance between theposition detecting device 1 and the player 100. For example, theposition detecting device 1 detects sets of three-dimensionalcoordinates corresponding to a plurality of parts (for example, head,shoulder, etc.) constituting the body of the player 100.

The game device 20 acquires the information relating to the position ofthe player 100 from the position detecting device 1. For example, thegame device 20 acquires a three-dimensional coordinate that indicate astanding position of the player 100 in a three-dimensional space fromthe position detecting device 1. The game device 20 controls the gamebased on changes in the three-dimensional coordinate.

A change in the three-dimensional coordinate associated with the player100 corresponds to an action of the player 100. For example, in a casewhere the player 100 has performed an action of raising their righthand, sets of the three-dimensional coordinates corresponding to theright elbow and the right hand of the player 100 mainly change.

1-2. Operation of Position Detecting Device

Next, description is given of processing in which the position detectingdevice 1 generates the information relating to the position of theplayer 100 (three-dimensional position information). As illustrated inFIG. 1, the position detecting device 1 includes, for example, a CCDcamera 2, an infrared sensor 3, and a microphone 4 including a pluralityof microphones. In this embodiment, the three-dimensional positioninformation of the player 100 is generated based on information acquiredfrom the CCD camera 2 and the infrared sensor 3.

The CCD camera 2 is a publicly-known camera comprising a CCD imagesensor. The CCD camera 2 photographs the player 100. For example, theCCD camera 2 generates a still image (for example, RGB digital image) byphotographing the player 100 at predetermined time intervals (forexample, every 1/60th of a second). Hereinafter, the still imagegenerated by the CCD camera 2 is referred to as a photographed image.The photographed image contains an object located within a field of viewof the CCD camera 2.

FIG. 2 is a diagram illustrating an example of the photographed imagegenerated by the CCD camera 2. As illustrated in FIG. 2, thephotographed image contains, for example, the player 100. It should benoted that in a case where the items of furniture F, the floor and thewall of the living room, and the like are contained within the field ofview of the CCD camera 2, the photographed image contains those objects,which are omitted in FIG. 2 for simplicity of description.

In the photographed image, there are set an Xs-axis and a Ys-axis, whichare orthogonal to each other. For example, the upper left corner of thephotographed image is set as an origin point Os (0,0). Further, forexample, the lower right corner of the photographed image is set as acoordinate Pmax (Xmax,Ymax). The position of each pixel in thephotographed image is identified by a two-dimensional coordinate (Xs-Yscoordinate) that is assigned to each pixel.

The infrared sensor 3 is formed of, for example, an infrared emittingdevice and an infrared receiving device (for example, infrared diodes).The infrared sensor 3 detects reflected light obtained by emittinginfrared light. The infrared sensor 3 measures the depth of a subject(for example, player 100) based on a detection result of the reflectedlight.

The depth of a subject is a distance between a measurement referenceposition (for example, position of the infrared receiving device of theinfrared sensor 3) and the position of the subject. The measurementreference position is a position that serves as a reference in measuringthe depth of the position of the player 100. The measurement referenceposition may be a predetermined position associated with the position ofthe position detecting device 1. The infrared sensor 3 measures thedepth of the player 100 based, for example, on a time of flight (TOF),which is a time required for the infrared sensor 3 to receive reflectedlight after emitting infrared light.

FIG. 3 is a diagram for describing a method of measuring the depth ofthe player 100, which is performed by the infrared sensor 3. Asillustrated in FIG. 3, the infrared sensor 3 emits pulsed infrared lightat predetermined intervals. The infrared light emitted from the infraredsensor 3 spreads spherically with an emission position of the infraredsensor 3 at the center.

The infrared light emitted from the infrared sensor 3 strikes surfacesof, for example, the body of the player 100 and other objects (forexample, furniture F, walls, etc.) located in the living room. Theinfrared light that has struck those surfaces is reflected. Thereflected infrared light is detected by the infrared receiving device ofthe infrared sensor 3. Specifically, the infrared sensor 3 detectsreflected light having a phase shifted by 180° from that of the emittedinfrared light.

For example, as illustrated in FIG. 3, in a case where the player 100 isholding out both hands, those held-out hands are closer to the infraredsensor 3 than the torso of the player 100. Specifically, the TOF of theinfrared light reflected by both hands of the player 100 is shorter thanthe TOF of the infrared light reflected by the torso of the player 100.

The value determined as follows corresponds to the distance between themeasurement reference position and the player 100 (that is, depth).Specifically, the value is determined by multiplying a time required forthe infrared sensor 3 to detect the reflected light after emitting theinfrared light (that is, TOF) by the speed of the infrared light andthen dividing the resultant value by two. In this manner, the infraredsensor 3 can measure the depth of the player 100.

Further, the infrared sensor 3 can also detect an outline of a subject(player 100) by detecting depth differences acquired from the reflectedinfrared light.

Specifically, the fact that the infrared sensor 3 receives the reflectedinfrared light as described above means that an object is located atthat place. If there is no other object located behind the object, thedepth difference between the object and the surroundings of the objectis large. Specifically, for example, the depth difference is largebetween a depth acquired by the infrared light reflected from the player100 and a depth acquired by the infrared light reflected from the wallbehind the player 100, and hence it is possible to detect the outline ofthe object by joining portions having the depth differences larger thana predetermined value.

It should be noted that the method of detecting the outline of an objectis not limited to the above-mentioned example. Alternatively, forexample, the outline may be detected based on the brightness of eachpixel of the photographed image acquired by the CCD camera 2. In thiscase, it is equally possible to detect the outline of the object by, forexample, joining portions having large brightness differences among thepixels.

It should be noted that the light that has returned to the infraredsensor 3 may be subjected to predetermined filtering processing.Specifically, noise may be reduced by employing such a configurationthat only reflected light corresponding to the infrared light emitted bythe infrared sensor 3 is detected by a light detection sensor.

Information relating to the depth of the player 100 (depth information),which is detected as described above, is expressed as, for example, adepth image. In this embodiment, description is given by taking, as anexample, a case where the depth information is expressed as a gray-scaledepth image (for example, 256-bit gray-scale image data).

FIG. 4 is a diagram illustrating an example of the depth image acquiredby the infrared sensor 3. As illustrated in FIG. 4, for example, anobject located close to the infrared sensor 3 is expressed as bright(brightness is high), and an object located far from the infrared sensor3 is expressed as dark (brightness is low). For example, in a case wherethe depth image is expressed as the 256-bit gray-scale image data, thedepth of the player 100 corresponds to the brightness (pixel value) ofthe depth image. Specifically, for example, for every 2-cm change indepth of the player 100, the depth image is changed by one bit. Thiscase means that the infrared sensor 3 is capable of detecting the depthof the subject in units of 2 cm.

As illustrated in FIG. 3, in the case where the player 100 is holdingout both hands, those held-out hands are closer to the infrared sensor 3than the torso of the player 100. In other words, the depth of bothhands of the player 100 is smaller than that of the torso. Accordingly,as illustrated in FIG. 4, pixels corresponding to both hands of theplayer 100 are expressed as brighter (brightness is higher) than pixelscorresponding to the torso.

In this embodiment, similarly to the CCD camera 2, the infrared sensor 3generates the depth image at predetermined time intervals (for example,every 1/60th of a second). Based on the photographed image acquired bythe CCD camera 2 and the depth image acquired by the infrared sensor 3,the three-dimensional position information is generated relating to theposition of the player 100.

For example, there is generated such a composite image (RGBD data) thatis obtained by adding the depth information (D: depth) indicated by thedepth image to the photographed image (RGB data) acquired by the CCDcamera 2. In other words, the composite image contains, for each pixel,color information (lightness of each of R, G, and B) and the depthinformation.

It should be noted that in generating the composite image, the positionof at least one of the photographed image and the depth image iscorrected based on a positional distance between the CCD camera 2 andthe infrared sensor 3. For example, in a case where the CCD camera 2 andthe infrared sensor 3 are spaced apart from each other by 2 cm in thehorizontal direction, the coordinates of each pixel of the depth imageare shifted by the number of pixels that corresponds to 2 cm, to therebycorrect the position.

The three-dimensional position information is generated based on thecomposite image. In this embodiment, description is given by taking, asan example, a case where the three-dimensional position informationrepresents the three-dimensional coordinate corresponding to each of theparts (for example, head, shoulder, etc.) of the body of the player 100.

Specifically, for example, the three-dimensional position information isgenerated in the following manner.

First, as described above, based on the depth image, pixelscorresponding to the outline of the player 100 are identified. Pixelsenclosed within the outline of the player 100 are the pixelscorresponding to the body of the player 100.

Next, in the photographed image, the color information (lightnesses ofR, G, and B) of the above-mentioned pixels enclosed within the outlineis referred to. Based on the color information of the photographedimage, pixels corresponding to each part of the body of the player 100are identified. For this identification method, for example, apublicly-known method is applicable, such as a pattern matching methodin which the object (that is, each part of the body of the player 100)is extracted from the image through a comparison with a comparison image(training image).

Alternatively, for example, pixels corresponding to the positions of thehead, both elbows, etc. of the player 100 may be identified bycalculating a velocity vector of each part of the body based on a changein color information of each pixel of the photographed image and thendetecting a motion vector of each pixel based on an optical flowrepresenting the movement of the object (for example, gradient method orfiltering method).

Based on the pixel values (RGBD values) of the pixels identified asdescribed above, the three-dimensional coordinates of the head, bothelbows, etc. of the player 100 are calculated. For example, thethree-dimensional coordinates are generated by carrying outpredetermined matrix transformation processing on those pixel values.The matrix transformation processing is executed through, for example, amatrix operation similar to transformation processing performed in 3Dgraphics between two coordinate systems of a world coordinate system anda screen coordinate system. Specifically, the RGB value indicating thecolor information of the pixel and the D value indicating the depth aresubstituted into a predetermined determinant, to thereby calculate thethree-dimensional coordinate of the pixel. That is, thethree-dimensional coordinates of each part of the player 100 arecalculated.

It should be noted that for the method of calculating thethree-dimensional coordinate that correspond to a pixel based on thepixel value (RGBD value), a publicly-known method may be applied, andthe calculation method is not limited to the above-mentioned example.Alternatively, for example, the coordinate transformation may beperformed using a lookup table.

FIG. 5 is a diagram illustrating an example of the three-dimensionalposition information generated by the position detecting device 1. Asillustrated in FIG. 5, as the three-dimensional position information,for example, each part of the player 100 and the three-dimensionalcoordinates are stored in association with each other.

FIG. 6 is a diagram illustrating the position of the player 100, whichis identified by the three-dimensional position information. In thisembodiment, for example, a predetermined position corresponding to theposition detecting device 1 (for example, the measurement referenceposition) is set as an origin point Ow. For example, the origin point Owrepresents the three-dimensional coordinate corresponding to themeasurement reference position of the infrared sensor 3. It should benoted that the position of the origin point Ow may be set anywhere inthe three-dimensional space in which the player 100 exists. For example,the three-dimensional coordinate corresponding to the origin point Os ofthe photographed image may be set as the origin point Ow.

As illustrated in FIG. 6, in this embodiment, description is given bytaking, as an example, a case where sets of three-dimensionalcoordinates corresponding to, for example, the head P1, neck P2, rightshoulder P3, left shoulder P4, right elbow P5, left elbow P6, right handP7, left hand P8, chest P9, waist P10, right knee P11, left knee P12,right heel P13, left heel P14, a right toe P15, and a left toe P16 ofthe player 100 are acquired as the three-dimensional positioninformation.

It should be noted that the part of the body of the player 100, which isindicated by the three-dimensional position information, may be a partthat is determined in advance from the player's skeletal frame. Forexample, any part of the body may be used as long as the part isidentifiable by the above-mentioned pattern matching method.

In this embodiment, as described above, based on the photographed imageand the depth image which are generated at the predetermined timeintervals, the three-dimensional position information is generated atpredetermined time intervals (for example, every 1/60th of a second).The generated three-dimensional position information is transmitted fromthe position detecting device 1 to the game device 20 at predeterminedtime intervals.

The game device 20 receives the three-dimensional position informationtransmitted from the position detecting device 1, and recognizes theposition of the body of the player 100 based on the three-dimensionalposition information. Specifically, if the player 100 has performed anaction of dancing or kicking a ball, the three-dimensional positioninformation changes in response to this action, and hence the gamedevice 20 recognizes the movement of the player based on the change inthree-dimensional position information. The game device 20 executes thegame while recognizing the movement of the body of the player based onthe three-dimensional position information, details of which aredescribed later.

Next, description is given of a space in which the position detectingdevice 1 can detect the player 100 (hereinafter, referred to asdetectable space 60).

FIG. 7 is a diagram illustrating a space to be photographed by theposition detecting device 1. As illustrated in FIG. 7, the detectablespace 60 (space enclosed with broken lines of FIG. 7) is, for example, apredetermined space within the field of view of the CCD camera 2. Thefield of view of the CCD camera 2 is determined based, for example, onthe line-of-sight and the angle of view of the CCD camera 2.

Of the space photographed by the position detecting device 1 (that is,space within the field of view), the detectable space 60 is such a spaceas to allow accurate capturing of the movement of the player 100.

For example, in a case where the position detecting device 1 and theplayer 100 are located too close to each other (for example, 1 meter orshorter), the position detecting device 1 is unable to photograph theentire body of the player 100. In such a case, for example, if the head,the foot, or the like of the player 100 is not contained in thephotographed image (FIG. 2), the position detecting device 1 is unableto acquire accurate three-dimensional position information. Therefore, aspace relatively close to the position detecting device 1 is excludedfrom the detectable space 60 even if the space is within the field ofview of the CCD camera 2.

Further, for example, in a case where the position detecting device 1and the player 100 are located too far from each other (for example, 5meters or longer), the infrared light is attenuated, which results inthe position detecting device 1 being unable to detect the reflectedlight. In such a case, the position detecting device 1 is unable toacquire accurate depth information. Therefore, a space relatively farfrom the position detecting device 1 is excluded from the detectablespace 60 even if the space is within the field of view of the CCD camera2.

Further, for example, in a case where the standing position of theplayer 100 is displaced in the horizontal direction (for example,Yw-axis direction), the position detecting device 1 is unable tophotograph the entire body of the player 100. In such a case, the rightside of or the left side of the body of the player 100 is omitted fromthe photographed image (FIG. 2), and hence the position detecting device1 is unable to acquire accurate three-dimensional position information.Therefore, a space close to both end portions of the horizontaldirection is excluded from the detectable space 60 even if the space iswithin the field of view of the CCD camera 2.

As illustrated in FIG. 7, the detectable space 60 is, for example, aspace obtained by excluding the respective spaces described above fromthe space within the field of view of the CCD camera 2. In other words,the detectable space 60 is a space in which the position detectingdevice 1 can generate accurate three-dimensional position informationwhen the player 100 is standing inside the space. The size (volume),shape, and position of the detectable space 60 may be determined inadvance by, for example, a game creator, or may be changed according toa state of a room where the position detecting device 1 is installed.

In this embodiment, a determination subject space 70 is set inside thedetectable space 60. As illustrated in FIG. 7, for example, thedetermination subject space 70 is set at a predetermined position insidethe detectable space 60 associated with the position detecting device 1.Further, the determination subject space 70 contains a representativepoint 71 for specifying a position at which the determination subjectspace 70 is to be placed.

The determination subject space 70 is used to define a space in whichthe player 100 needs to be located. The size (volume) and shape of thedetermination subject space 70 may be determined in advance by, forexample, a game creator. On the other hand, the position of thedetermination subject space 70 is changed, for example, according to theposition of the player 100, details of which are described later.

Here, description is given of the significance of the determinationsubject space 70 illustrated in FIG. 7. As described above, in the casewhere the player 100 is in the detectable space 60, in principle, thegame device 20 can detect the action of the player 100.

However, there is a case where the player 100 is unable to move freelyin the detectable space 60. One example is a case where the player 100plays the game in a living room or the like of their house asillustrated in FIG. 1.

As illustrated in FIG. 1, the items of furniture F, such as a desk and achair, and the walls and the like of the living room are placed in theliving room. Further, there is a case where there is another player 100or a person who is watching the game in the living room. Thus, in a casewhere the player 100 actually plays the game, various obstacles areoften placed inside the detectable space 60, and hence, in such a case,the player is unable to move freely in the detectable space 60.

Further, in a case where the player 100 gets absorbed in the gameplay,there is a risk that the player 100 will not notice the existence ofobstacles in their surroundings. Specifically, there is a risk that theplayer 100 will move their body despite the existence of an obstacle andhit their body against the obstacle. Further, in a case where aplurality of players 100 play the game simultaneously, there is a riskthat those players 100 will hit each other because each of the playersmoves their body to play the game.

In view of this, in this embodiment, the determination subject space 70is set inside the detectable space 60, and the player is prompted toplay the game in the determination subject space 70. Specifically, aslong as the player 100 plays the game in the determination subject space70, it is possible to reduce the risk of the player 100 hitting anotherplayer 100 or an obstacle. Therefore, the determination subject space 70serves to show the player 100 a safe space in which the player 100 has alow risk of hitting an obstacle.

Normally, the player 100 clears away surrounding items of furniture Ffrom their standing position to ensure safety in their surroundings, andthen starts to play the game. Thus, the position of the determinationsubject space 70 is determined based, for example, on the position ofthe player 100 at the time of game start (alternatively, immediatelybefore or after the game start). For example, the position of thedetermination subject space 70 is set so as to contain a place where theplayer 100 is standing at the time of the game start (alternatively,immediately before or after the game start).

If the player 100 remains inside the determination subject space 70 setas described above, there is a high possibility that there will be nosuch obstacle as a desk or a chair in their surroundings, and hence theplayer 100 can play the game more safely.

It should be noted that the setting method for the position of thedetermination subject space 70 is not limited to the above-mentionedexample. For example, an extension of the line-of-sight of the CCDcamera 2 may be set as an initial position of the determination subjectspace 70. In this case, it is possible to prompt the player 100 to standat a position facing the position detecting device 1 (for example,position in the vicinity of the front of a TV set) to play the game.

It should be noted that in the example described above, one player 100plays the game, but a plurality of players 100 may play the game. In thecase where there are a plurality of players 100, through the sameprocessing as described above, the three-dimensional positioninformation of each player 100 is generated. Specifically, based on thenumber of outlines of the players 100, the position detecting device 1can recognize the number of the players 100. The same processing asdescribed above is executed with respect to pixels corresponding to eachof the plurality of players 100, and hence it is possible to generatethe three-dimensional position information of the plurality of players100.

Further, when the player 100 is identified from the photographed imageacquired by the position detecting device 1, an object having apredetermined height (for example, one meter) or shorter may beexcluded. Specifically, in a case such as where the player 100 issitting on the floor and thus their sitting height is equal to orshorter than the predetermined height, there is a risk that the player100 will not be detected accurately. Therefore, in this case, the player100 may be prevented from being detected.

As described above, the game is executed based on the three-dimensionalposition information of the player 100 in the determination subjectspace 70. Hereinafter, an example of the game is described.

1-3. Game to be Executed on Game Device

In this embodiment, description is given by taking, as an example, acase where the game device 20 recognizes the standing position and theaction of the player based on the three-dimensional position informationto execute a dance game.

For example, the game device 20 executes a game configured such that theplayer 100 dances to movements of a game character on a game screen 50.In this game, for example, the player 100 is required to play the gamewithout moving away from a predetermined standing position. In view ofthis, according to the game screen 50 displayed in this embodiment, in acase where the player 100 has stepped out of the determination subjectspace 70, it is possible to prompt the player 100 to return to thedetermination subject space 70.

FIG. 8 is a diagram illustrating an example of the game screen 50displayed by the game device 20. As illustrated in FIG. 8, the gamescreen 50 includes, for example, a game character 51, a spotlight 52, aspotlight area 53 being an area illuminated by the spotlight 52, and amessage 54. In the game according to this embodiment, in principle, thegame character 51 stands within the spotlight area 53 (focused area) anddances.

The lightness (brightness) of the spotlight area 53 is higher (brighter)than the lightness of the other area. On the other hand, the lightnessof an area outside the spotlight area 53 is lower (darker) than thelightness of the spotlight area 53. Specifically, in a case where thegame character 51 moves out of the spotlight area 53, the game character51 becomes less visible.

The game character 51 moves the respective parts of its body, therebyserving to show a dance action to be performed by the player 100.According to movements of the body of the game character 51, the player100 dances in front of the position detecting device 1.

For example, if the game character 51 has stepped its right footforward, the player 100 steps their right foot forward as well. Further,for example, if the game character 51 has performed an action of raisingits left hand, the player 100 performs an action of raising their lefthand as well. In a case where the player 100 has succeeded in movingtheir body according to the action of the game character 51, forexample, the message 54 that reads “GOOD” is displayed on the gamescreen 50.

Further, in a case where the player 100 has stepped out of thedetermination subject space 70, the message 54 to that effect isdisplayed on the game screen 50.

FIG. 9 is a diagram illustrating, as an example, the game screen 50displayed by the game device 20 in the case where the player 100 hasstepped out of the determination subject space 70. As illustrated inFIG. 9, for example, the message 54 that reads “CAUTION” is displayed onthe game screen 50. Specifically, because the player 100 is outside therelatively safe determination subject space 70, the message 54 thatissues a warning is displayed.

Further, in this case, the display position of the spotlight area 53 maybe configured to correspond to the determination subject space 70 of theposition detecting device 1. Hereinafter, this example is described.Specifically, in the case where the player 100 is inside thedetermination subject space 70, the game character 51 is located at aposition with high lightness. In other words, in this case, the gamecharacter 51 is located in the spotlight area 53.

On the other hand, in the case where the player 100 has stepped out ofthe determination subject space 70, the game character 51 is located ata position with low lightness. In other words, in this case, the gamecharacter 51 is located in the area outside the spotlight area 53.

FIG. 10 is a diagram illustrating the position detecting device 1 andthe player 100 viewed from an Xw-Zw plane (that is, from the side). FIG.10 illustrates a case where the player 100 has moved backward whiledancing. As illustrated in FIG. 10, the player 100 has moved backwardand therefore is out of the determination subject space 70.

If the player 100 is unaware of this fact and continues the gameplay,there is a risk that the player 100 will hit the furniture locatedtherebehind, such as a sofa. Thus, there is displayed a game screen 50that prompts the player 100 to move forward to return to the inside ofthe determination subject space 70.

FIG. 11 is an example of the game screen 50 displayed in the case wherethe player 100 has stepped out of the determination subject space 70.The game screen 50 of FIG. 11 is displayed in the case where the player100 is standing at the position of FIG. 10. As illustrated in FIG. 11,the game character 51 is displayed in the area outside the spotlightarea 53 (for example, at a predetermined position in the rear). Asdescribed above, the area outside the spotlight area 53 is set low inlightness.

Specifically, because the game character 51 is displayed in a relativelydark area, the player 100 finds the game character 51 less visible. Insuch a case, it is conceivable that the player 100 will move forward soas to cause the game character 51 to move to the spotlight area 53,which is bright and thus makes the game character 51 more visible.Specifically, in a case where the player 100 has stepped backward out ofthe determination subject space 70 when viewed from the positiondetecting device 1, by causing the position of the game character 51 tomove out of the spotlight area 53, it is possible to prompt the player100 to move toward the determination subject space 70.

FIG. 12 is a diagram illustrating the position detecting device 1 andthe player 100 viewed from an Xw-Yw plane (that is, from the above).FIG. 12 illustrates a case where the player 100 has moved in thehorizontal direction (for example, Yw-axis direction) while dancing. Asillustrated in FIG. 12, for example, the player 100 is displaced in thehorizontal direction and is therefore out of the determination subjectspace 70.

FIG. 13 is an example of the game screen 50 displayed in the case wherethe player 100 has stepped out of the determination subject space 70.The game screen 50 of FIG. 13 is displayed in the case where the player100 is standing at the position of FIG. 12.

Specifically, because the game character 51 is displayed in a relativelydark area, the player 100 finds the game character 51 less visible. Theplayer 100 moves leftward so as to cause the game character 51 to moveto the spotlight area 53, which is bright and thus makes the gamecharacter 51 more visible. Specifically, in a case where the player 100has stepped in the horizontal direction out of the determination subjectspace 70 when viewed from the position detecting device 1, it ispossible to prompt the player 100 to move toward the determinationsubject space 70.

As described above, for example, in a dance game configured such thatthe player 100 dances to the movements of the game character 51, thereis a case where the standing position of the player 100 changesgradually during the gameplay. Specifically, even though the player 100has ensured safety in their surroundings at the time of starting thegame, if the player 100 gets absorbed in the game, there is a risk thatthe player 100 will move closer to an obstacle. To address this, thegame device 20 sets the determination subject space 70 for showing thestanding position of the player 100, and hence it is possible to showthe standing position to the player 100.

By the way, in the case where the player 100 has stepped out of thedetermination subject space 70, if the position of the game character 51is moved out of the spotlight area 53 as illustrated in FIG. 11 or FIG.13, the game character 51 becomes less visible. It is possible to guidethe player 100 to a safe position, but there is a case where no obstacleis actually placed in the area outside the determination subject space70. Specifically, there is a fear of such inconvenience that the player100 feels difficulty playing the game because the determination subjectspace 70 is fixed to the initial position. Hereinafter, description isgiven of detailed processing relating to technology that solves thisinconvenience.

First, detailed description is given of configurations of the positiondetecting device 1 and the game device 20.

1-4. Configuration of Position Detecting Device

FIG. 14 is a diagram illustrating a hardware configuration of theposition detecting device 1. As illustrated in FIG. 14, the positiondetecting device 1 includes a microprocessor 10, a storage unit 11, aphotographing unit 12, a depth measuring unit 13, an audio processingunit 14, and a communication interface unit 15. The respectivecomponents of the position detecting device 1 are connected to oneanother by a bus 16 so as to be able to exchange data thereamong.

The microprocessor 10 controls the respective units of the positiondetecting device 1 according to an operating system and various kinds ofprograms which are stored in the storage unit 11.

The storage unit 11 stores programs and various kinds of parameterswhich are used for operating the operating system, the photographingunit 12, and the depth measuring unit 13. Further, the storage unit 11stores a program for generating the three-dimensional positioninformation based on the photographed image and the depth image.

The photographing unit 12 includes the CCD camera 2 and the like. Thephotographing unit 12 generates, for example, the photographed image ofthe player 100.

The depth measuring unit 13 includes the infrared sensor 3 and the like.The depth measuring unit 13 generates the depth image based, forexample, on the TOF acquired using the infrared sensor 3.

As described above, the microprocessor 10 generates thethree-dimensional position information based on the photographed imagegenerated by the photographing unit 12 and the depth image generated bythe depth measuring unit 13. The microprocessor 10 identifies thepositions of pixels corresponding to the respective parts (for example,head P1 to left toe P16) of the player 100 based on the photographedimage.

Next, the microprocessor 10 executes coordinate transformationprocessing and calculates the three-dimensional coordinate based on theRGBD values of the identified pixels. The coordinate transformationprocessing is performed based on the matrix operation as describedabove. Through a series of those processing steps, the three-dimensionalposition information (FIG. 5) is generated at the predetermined timeintervals (for example, every 1/60th of a second).

The audio processing unit 14 includes the microphone 4 and the like. Forexample, the audio processing unit 14 can identify a position at whichthe player 100 has made a sound based on time lags among sounds detectedusing a plurality of (for example, three) microphones. Further, as themicrophone 4 of the audio processing unit 14, a unidirectionalmicrophone that detects sounds originating from a sound source locatedalong the line-of-sight of the CCD camera 2 may be applied.

The communication interface unit 15 is an interface for transmittingvarious kinds of data, such as the three-dimensional positioninformation, to the game device 20.

1-5. Configuration of Game Device

FIG. 15 is a diagram illustrating a hardware configuration of the gamedevice 20. As illustrated in FIG. 15, the game device 20 according tothis embodiment includes a home-use game machine 21, a display unit 40,an audio output unit 41, an optical disk 42, and a memory card 43. Thedisplay unit 40 and the audio output unit 41 are connected to thehome-use game machine 21. For example, a home-use television set is usedas the display unit 40. Further, for example, a speaker integrated intothe home-use television set is used as the audio output unit 41.

The optical disk 42 and the memory card 43 are information storagemedia, and are inserted into the home-use game machine 21.

The home-use game machine 21 is a publicly-known computer game system,and, as illustrated in FIG. 15, includes a bus 22, a microprocessor 23,a main memory 24, an image processing unit 25, an audio processing unit26, an optical disk reproducing unit 27, a memory card slot 28, acommunication interface (I/F) 29, a controller interface (I/F) 30, and acontroller 31. Components other than the controller 31 are accommodatedin an enclosure of the home-use game machine 21.

The bus 22 is used for exchanging addresses and data among the unitsconstituting the home-use game machine 21. Specifically, themicroprocessor 23, the main memory 24, the image processing unit 25, theaudio processing unit 26, the optical disk reproducing unit 27, thememory card slot 28, the communication interface 29, and the controllerinterface 30 are connected to one another by the bus 22 so as to be ableto communicate data thereamong.

The microprocessor 23 executes various kinds of information processingbased on an operating system stored in a ROM (not shown), or programsread from the optical disk 42 or the memory card 43.

The main memory 24 includes, for example, a RAM. The program and dataread from the optical disk 42 or the memory card 43 are written into themain memory 24 as necessary. The main memory 24 is also used as aworking memory for the microprocessor 23.

Further, the main memory 24 stores the three-dimensional positioninformation received from the position detecting device 1 at thepredetermined time intervals. The microprocessor 23 controls the gamebased on the three-dimensional position information stored in the mainmemory 24.

The image processing unit 25 includes a VRAM, and renders, based onimage data transmitted from the microprocessor 23, the game screen 50 inthe VRAM. The image processing unit 25 converts the game screen 50 intovideo signals, and outputs the video signals to the display unit 40 at apredetermined timing.

The audio processing unit 26 includes a sound buffer. The audioprocessing unit 26 outputs, from the audio output unit 41, various kindsof audio data (game music, game sound effects, messages, etc.) that havebeen read from the optical disk 42 into the sound buffer.

The optical disk reproducing unit 27 reads a program and data recordedon the optical disk 42. In this embodiment, description is given bytaking, as an example, a case where the optical disk 42 is used forsupplying the program and the data to the home-use game machine 21.Alternatively, for example, another information storage medium (forexample, memory card 43 or the like) may be used. Further, the programand the data may be supplied to the home-use game machine 21 via a datacommunication network such as the Internet.

The memory card slot 28 is an interface for the memory card 43 to beinserted into. The memory card 43 includes a nonvolatile memory (forexample, EEPROM etc.). The memory card 43 stores various kinds of gamedata, such as saved data.

The communication interface 29 is an interface for establishingcommunication connection to a communication network such as theInternet.

The controller interface 30 is an interface for establishing wirelessconnection or wired connection to the controller 31. As the controllerinterface 30, an interface compliant with, for example, the Bluetooth(registered trademark) interface standard may be used. It should benoted that the controller interface 30 may be an interface forestablishing wired connection to the controller 31.

1-6. Functions to be Implemented on Game Device

FIG. 16 is a functional block diagram illustrating a group of functionsto be implemented on the game device 20. As illustrated in FIG. 16, onthe game device 20, there are implemented a game data storage unit 80, aposition acquiring unit 82, a determination unit 84, a game processingexecution unit 86, a determination subject space changing unit 88, and adisplay control unit 90. Those functions are implemented by themicroprocessor 23 operating according to programs read from the opticaldisk 42.

1-6-1. Game Data Storage Unit

The game data storage unit 80 is mainly implemented by the main memory24 and the memory card 43. The game data storage unit 80 storesinformation necessary for executing the game. For example, the game datastorage unit 80 stores animation information indicating how the gamecharacter 51 moves its body.

Further, for example, the game data storage unit 80 stores referenceaction information for identifying an action to be performed by theplayer 100.

FIG. 17 is a diagram illustrating an example of the reference actioninformation. As illustrated in FIG. 17, as the reference actioninformation, time information indicating a timing at which an action isto be performed and information for identifying an action to beperformed by the player 100 are stored. The time information indicates,for example, an elapsed time after the game is started. In a datastorage example illustrated in FIG. 17, for example, a time t₁ indicatesthat the player 100 should perform an action of putting their right footforward.

As described above, the game character 51 plays a role of showing anaction to be performed by the player 100, and thus, when the time t₁arrives, the game character 51 performs an action that looks likeputting its right foot forward. The animation information is created insuch a manner as to correspond to the reference action informationillustrated in FIG. 17. Specifically, every time a time indicated by thetime information stored in the reference action information arrives, thegame character 51 performs a predetermined animation action based on theanimation information.

Further, for example, the game data storage unit 80 stores actiondetermination criterion information, which serves as a condition formaking a determination as to the action of the player based on thethree-dimensional position information.

FIG. 18 is a diagram illustrating an example of the action determinationcriterion information. As illustrated in FIG. 18, as the actiondetermination criterion information, for example, information foridentifying the movement of the body of the player 100 and adetermination criterion to be satisfied by the three-dimensionalposition information are stored in association with each other. Thedetermination criterion includes, for example, a change amount, a changedirection, a change speed, and the like of the three-dimensionalcoordinate of each part of the player 100. Specifically, for example,the determination criterion is a condition to be satisfied by the motionvector (three-dimensional vector) of each part of the player 100.

In a case where “putting the right foot forward” is the movement of thebody which is stored in the action determination criterion information,for example, conditions relating to the change amounts, the changedirections, and the change speeds of the sets of the three-dimensionalcoordinates of the right heel P13 and the right toe P15 are associatedwith this movement of the body. In this case, if the change amounts, thechange directions, and the change speeds of the sets of thethree-dimensional coordinates of the right heel P13 and the right toeP15 satisfy the conditions stored in the action determination criterioninformation, it is determined that the player 100 has put their rightfoot forward.

The same applies to other actions of the player 100 (for example,punching with the right hand, etc.), and the action of the player 100 isdetermined based on whether or not the three-dimensional coordinatesindicated by the three-dimensional position information satisfy theconditions stored in the action determination criterion information.Specifically, in this embodiment, the determination criterioninformation is obtained by storing information for making adetermination as to dancing of the player 100. It should be noted thatthe determination criterion information may be stored in a ROM (notshown) or the like of the game device 20.

Further, the game data storage unit 80 stores, for example,determination subject space information for identifying thedetermination subject space 70. For example, in a case where the shapeof the determination subject space 70 is such a truncated pyramid asillustrated in FIG. 7, the length of each side of the determinationsubject space 70 and information indicating the representative point 71are stored. That is, based on those items of information, the positionof the determination subject space is identified. Further, the length ofeach side of the determination subject space 70 may be a valuedetermined in advance.

For example, when the player 100 starts the game, the initial positionof the representative point 71 is determined. For example, the positionof the determination subject space 70 is determined so as to contain theposition of the player 100 when the game is started. Specifically, forexample, the representative point 71 is determined so as to correspondto the standing position of the player 100 at the time starting thegame. Alternatively, for example, the representative point 71 may be apoint located along the line-of-sight of the CCD camera 2.

It should be noted that information that may be used as thedetermination subject space information is not limited to theabove-mentioned example. The determination subject space information maybe any information as long as the information allows the position andthe size of the determination subject space 70 to be identified. Forexample, in the case where the shape of the determination subject space70 is a truncated pyramid, the determination subject space informationmay be information indicating the upper left vertices and the lowerright vertices of the top surface and the bottom surface of thedetermination subject space 70 and information indicating therepresentative point 71.

Further, the game data storage unit 80 stores information foridentifying the detectable space 60. Similarly to the determinationsubject space information, this information may be any information aslong as the information allows the position and the size of thedetectable space 60 to be identified.

1-6-2. Position Acquiring Unit

The position acquiring unit 82 is mainly implemented by themicroprocessor 23. The position acquiring unit 82 acquires thethree-dimensional position information (FIG. 5) from positioninformation generating means (microprocessor 10) for generating thethree-dimensional position information relating to the position of theplayer 100 in the three-dimensional space based on the photographedimage acquired from the position detecting device (photographing unit12) for photographing the player 100 and the depth information relatingto a distance between the measurement reference position of the depthmeasuring means (depth measuring unit 13) and the player 100.

In this embodiment, the position acquiring unit 82 acquires thethree-dimensional position information generated by the microprocessor10 (position information generating means) of the position detectingdevice 1.

1-6-3. Determination Unit

The determination unit 84 is mainly implemented by the microprocessor23. The determination unit 84 determines whether or not the position ofthe player 100 in the three-dimensional space is contained in thedetermination subject space 70. For example, in a case where any one ofthe sets of the three-dimensional coordinates contained in thethree-dimensional position information is outside the determinationsubject space 70, it is determined that the position of the playercorresponding to the three-dimensional position information is notcontained in the determination subject space 70 of the positiondetecting device 1.

It should be noted that the determination method performed by thedetermination unit 84 may be any method as long as the method isperformed based on the three-dimensional position information and thedetermination subject space 70, and that the determination method of thedetermination unit 84 is not limited thereto. For example, in a casewhere sets of the three-dimensional coordinates corresponding to aplurality of (for example, three) portions of a plurality of (forexample, sixteen) parts of the player 100 indicated by thethree-dimensional position information are outside the determinationsubject space 70, it may be determined that the position of the player100 is not contained in the determination subject space 70.

1-6-4. Game Processing Execution Unit

The game processing execution unit 86 is mainly implemented by themicroprocessor 23. The game processing execution unit 86 executes gameprocessing based on a result of a determination made by thedetermination unit 84. Details of operation of the game processingexecution unit 86 are described later (see S105, S106, and S107 of FIG.19).

1-6-5. Determination Subject Space Changing Unit

The determination subject space changing unit 88 is mainly implementedby the microprocessor 23. In a case where it is determined that theposition of the player 100 in the three-dimensional space is notcontained in the determination subject space 70, the determinationsubject space changing unit 88 changes the position of the determinationsubject space 70 based on the position of the player 100 in thethree-dimensional space. Details of operation of the determinationsubject space changing unit 88 are described later (see S108 and S109 ofFIG. 19).

1-6-6. Display Control Unit

The display control unit 90 is mainly implemented by the microprocessor23. The display control unit 90 displays the game screen 50 on thedisplay unit 40. In this embodiment, the display control unit 90 causesdisplay means (display unit 40) to display the game screen 50 containingthe game character 51 and the focused area (spotlight area 53) havingits lightness set higher than that of the other area.

Further, the display control unit 90 includes means for controlling thepositional relation between the display position of the game character51 and the display position of the focused area based on the positionalrelation between the position of the player 100 in the three-dimensionalspace and the determination subject space 70. Details of operation ofthe display control unit 90 are described later (see S102 of FIG. 19).

1-7. Processing to be Executed on Game Device

FIG. 19 is a flow chart illustrating an example of processing to beexecuted on the game device 20. The processing of FIG. 19 is executed bythe microprocessor 23 operating according to programs read from theoptical disk 42. For example, the processing of FIG. 19 is executed atpredetermined time intervals (for example, every 1/60th of a second).

As illustrated in FIG. 19, first, the microprocessor 23 (positionacquiring unit 82) acquires the three-dimensional position informationof the player 100 (S101).

The microprocessor 23 (display control unit 90) changes the position ofthe game character 51 to be displayed on the game screen 50 (S102). InS102, for example, the display position of the game character 51 ischanged based on the positional relation between the three-dimensionalposition information of the player 100 and the representative point 71.For example, a determination is made as to the positional relationbetween the three-dimensional coordinates of the waist P10 contained inthe three-dimensional position information of the player 100 and therepresentative point 71. Specifically, a direction D from therepresentative point 71 of the determination subject space 70 toward thethree-dimensional coordinate of the waist P10 of the player and adistance L therebetween are acquired (FIG. 7).

Next, the display position of the game character 51 is changed so thatthe positional relation between the display position of the gamecharacter 51 and a guidance position 55 of the spotlight area 53corresponds to the positional relation between the three-dimensionalcoordinate of the waist P10 of the player and the representative point71 of the determination subject space 70.

For example, as illustrated in FIG. 11 and FIG. 13, the display positionof the game character 51 is changed from the guidance position 55 of thespotlight area 53 to a position 57 obtained by shifting the guidanceposition 55 of the spotlight area 53 by a distance Ls corresponding tothe above-mentioned distance L in a direction Ds corresponding to theabove-mentioned direction D. The direction Ds and the distance Ls arerespectively calculated based, for example, on the direction D or thedistance L and a predetermined mathematical expression. Thepredetermined mathematical expression may be, for example, apredetermined matrix (for example, projection matrix) for transforming athree-dimensional vector to a two-dimensional vector.

Further, the guidance position 55, which is a position for guiding thegame character 51, corresponds to the representative point 71. Forexample, the guidance position 55 is a position located a predetermineddistance above a center point of the spotlight area 53.

Through the processing of S102, the display position of the gamecharacter 51 is controlled. Specifically, by referring to the positionalrelation between the game character 51 and the spotlight area 53 whichare displayed on the game screen 50, the player 100 can recognizewhether or not the position of the body of the player 100 is out of thedetermination subject space 70.

As a result, the player can adjust their own standing position. Further,in a case where the game character 51 has moved out of the spotlightarea 53, the game character 51 becomes less visible, and hence it isconceivable that the player will unconsciously adjust their own standingposition so that the game character 51 is positioned within thespotlight area 53. By controlling the display position of the gamecharacter 51 as described above, it also becomes possible to make theplayer unconsciously adjust their own standing position.

Referring back to FIG. 19, the microprocessor 23 (display control unit90) updates the posture of the game character 51 displayed on the gamescreen 50 based on animation data (S103).

The microprocessor 23 (determination unit 84) determines whether or notat least one position of the body of the player 100 indicated by thethree-dimensional position information is outside the determinationsubject space 70 (S104). The determination of S104 is performed by, forexample, comparing the three-dimensional position information and thedetermination subject space information. Specifically, for example, adetermination is made based on whether or not the three-dimensionalcoordinates (FIG. 5) contained in the three-dimensional positioninformation are inside the determination subject space 70 (FIG. 7).

In a case where the position of the player is not outside thedetermination subject space 70 (S104; N), that is, in a case where allthe positions corresponding to the player 100 are inside thedetermination subject space 70, the microprocessor 23 (game processingexecution unit 86) determines whether or not the player 100 has movedtheir body according to the movement of the body of the game character51 (S105).

In S105, it is determined whether or not the player 100 has performed anaction similar to the action (movement of the body) performed by thegame character 51. This determination is executed based, for example, onthe three-dimensional position information, the reference actioninformation (FIG. 17), and the determination criterion information (FIG.18).

In a case where the reference action information is the data storageexample illustrated in FIG. 17, for example, it is indicated that thegame character 51 puts its right foot forward at the time t₁. In thiscase, at a time at which the game character 51 puts its right footforward (hereinafter, referred to as “reference time”), it is determinedwhether or not the player has put their right foot forward. Thereference time is, for example, a time within a predetermined periodincluding times (for example, time t₁) stored in the reference actioninformation.

Here, the “predetermined period” is, for example, a period from a starttime that is a predetermined time before the reference time until an endtime that is a predetermined time after the reference time. In a casewhere the player 100 has put their right foot forward within theabove-mentioned predetermined period, it is determined that the playerhas moved their foot according to the movement of the foot of the gamecharacter 51. In other words, it is determined that the player 100 hasperformed an action according to the movement of the game character 51.As described above, whether or not the player 100 has put their rightfoot forward is determined based on the determination criterioninformation (FIG. 18).

In a case where it is determined that the player 100 has performed anaction according to the movement of the game character 51 (S105; Y), themicroprocessor 23 (game processing execution unit 86) displays themessage 54 such as “GOOD” on the game screen 50 (S106).

On the other hand, in a case where it is not determined that the player100 has performed an action according to the movement of the gamecharacter 51 (S105; N), the microprocessor 23 does not display such amessage as in S106 and ends the processing.

On the other hand, in a case where at least one position of the body ofthe player is outside the determination subject space 70 (S104; Y), themicroprocessor 23 (game processing execution unit 86) displays themessage 54 such as “CAUTION” on the game screen (S107).

The microprocessor 23 (determination subject space changing unit 88)determines whether or not a state in which at least one position of thebody of the player is outside the determination subject space 70 hascontinued for a reference period (for example, three seconds) (S108).

In a case where the state in which at least one position of the body ofthe player is outside the determination subject space 70 has continuedfor the reference period (S108; Y), the microprocessor 23 (determinationsubject space changing unit 88) changes the position of thedetermination subject space 70 (S109).

In S109, for example, the three-dimensional coordinate of the waist P10in the three-dimensional position information is referred to.Subsequently, the position of the determination subject space 70 ischanged so that the representative point 71 of the determination subjectspace 70 coincides with the three-dimensional coordinate correspondingto the waist P10 of the player.

FIG. 20 is a diagram illustrating the determination subject space 70after the change. As illustrated in FIG. 20, the position of thedetermination subject space 70 is changed so that the position of thewaist P10 of the player 100 coincides with the representative point 71.

It should be noted that the change method for the position of thedetermination subject space 70 performed in S109 may be any method aslong as the position of the player 100 is contained in the determinationsubject space 70 based on the position of the player 100 indicated bythe three-dimensional position information, and that the change methodis not limited to the above-mentioned example. In addition, for example,the position of the determination subject space 70 may be changed sothat an average value of the sets of three-dimensional coordinatescontained in the three-dimensional position information coincides withthe representative point 71.

For example, in a case where the player 100 has moved closer to anobstacle, it is conceivable that the player 100 will notice that factwithin a predetermined time period and return to the original position.Specifically, in view of the above, in a case where the state in whichthe player 100 is out of the determination subject space 70 before thechange has continued for the predetermined time period, it isconceivable that there is a high possibility that there is no obstaclearound the current standing position of the player 100. Thus, in thiscase, in order to allow the player 100 to continue the gameplay, asillustrated in FIG. 19, the position of the determination subject space70 is changed so that the position of the body of the player iscontained in the determination subject space 70.

On the other hand, in a case where the state in which at least oneposition of the body of the player is outside the determination subjectspace 70 has not continued for the reference period (S108; N), themicroprocessor 23 ends the processing. Specifically, in this case, themicroprocessor 23 does not perform the processing of displaying themessage 54 such as “GOOD” based on the movement of the body of theplayer 100. In other words, by making no response to the dance actionperformed by the player 100, it is also possible to make the player 100understand that the player 100 is not in the determination subject space70.

1-8. Summary of Embodiment

In the game device 20 described above, when the game processing isexecuted, whether or not the message 54 such as “CAUTION” is to bedisplayed or whether or not detection of the action of the player 100 isto be avoided is determined based on whether or not the player 100 is inthe determination subject space 70. Further, the position of thedetermination subject space 70 is changed based on the position of theplayer 100 in the three-dimensional space, and hence it is possible tochange the determination subject space 70 for the player 100 to be ableto continue the gameplay while prompting the player 100 to stay in thedetermination subject space 70.

As described above, at the time of starting the game (alternatively,immediately before or after starting the game), it is possible to ensuresafety of the player 100 within their surroundings are safe.Accordingly, by guiding the player 100 to this safe position, it ispossible to reduce a risk that the player 100 will hit an obstacle oranother player 100. Therefore, even if a game is configured to requirethe player 100 to move their body, the player 100 can play the gamesafely.

Further, based on the positional relation between the position of thebody of the player 100 and the position of the determination subjectspace 70, the positional relation between the display position of thegame character 51 and the display position of the spotlight area 53 iscontrolled. For example, in the case where the position of the body ofthe player 100 is out of the determination subject space 70, the gamecharacter 51 is located outside the spotlight area 53 (see FIG. 11 andFIG. 13).

According to the game device 20, by referring to the positional relationbetween the game character 51 and the spotlight area 53 which aredisplayed on the game screen 50, the player 100 can recognize whether ornot the position of the body of the player 100 is out of thedetermination subject space 70. As a result, in the case where thestanding position of the player 100 has changed during the gameplay, theplayer 100 can know that their standing position has changed. Therefore,the player 100 can adjust their own standing position.

Further, in the case where the game character 51 has moved out of thespotlight area 53, the game character 51 becomes less visible.Accordingly, it is conceivable that the player 100 will try tounconsciously adjust their own standing position so that the gamecharacter 51 is located within the spotlight area 53. As describedabove, according to the game device 20, it is also possible to make theplayer 100 unconsciously adjust their own standing position.

Further, in the game device 20, in the case where the state in which atleast one position of the body of the player 100 is outside thedetermination subject space 70 has continued for the reference period(for example, three seconds), the position of the determination subjectspace 70 is changed so that the position of the body of the player 100is contained in the determination subject space 70 (see FIG. 20).

According to the above-mentioned processing of the game device 20, inthe state in which the position of at least one part of the body of theplayer 100 is outside the determination subject space 70 because thestanding position of the player 100 has changed during the gameplay, itis possible to continue the game even if the player 100 does not adjusttheir standing position. As described above, in the case where the statein which the player 100 is outside the determination subject space 70has continued for the reference period, there is a high possibility thatno obstacle is around the standing position of the player 100, and henceit is possible to guarantee safety for the player 100 even if theposition of the determination subject space 70 is changed.

Further, for example, if the position of the determination subject space70 is changed even in a case where any one position of the body of theplayer is outside the determination subject space 70 for a brief moment,there arises a fear that the player will become confused instead. Inthis respect, the game device 20 is capable of preventing the playerfrom feeling such confusion.

2. Modified Examples

It should be noted that the present invention is not limited to theembodiment described above.

2-1. First Modified Example

In S102 of FIG. 19, the display position of the spotlight area 53 (andthe spotlight 52) may be changed so that the positional relation betweenthe display position of the game character 51 and the guidance position55 of the spotlight area 53 corresponds to the positional relationbetween the position of the player 100 (for example, thethree-dimensional coordinate of the waist P10) and the representativepoint 71 of the determination subject space 70. In other words, thespotlight area 53 may be moved instead of moving the game character 51.

Alternatively, the display positions of both the game character 51 andthe spotlight area 53 (and the spotlight 52) may be changed so that thepositional relation between the display position of the game character51 and the guidance position 55 of the spotlight area 53 corresponds tothe positional relation between the position of the player 100 (forexample, the three-dimensional coordinate of the waist P10) and therepresentative point 71 of the determination subject space 70.

Further, without changing the relative positions of the game character51, the spotlight area 53, and the like, the display position of thegame character 51 may be moved to the right-hand side, the left-handside, or the like of the game screen 50. Specifically, for example, in acase where the game screen 50 is a screen showing a situation of avirtual game space viewed from a virtual camera, by changing theposition of the virtual camera, the display position of the gamecharacter 51 is changed as described above.

FIG. 21 is a diagram illustrating a case where the display position ofan image contained in the game screen 50 has been changed. The gamescreen 50 illustrated in FIG. 21 is displayed, for example, in a casewhere the player 100 has moved to the right-hand side of thedetermination subject space 70 with respect to the position detectingdevice 1. The position of the virtual camera is changed to the left, andthus, for example, the game character 51 located in the vicinity of thecenter of the game screen 50 is moved to the right in relation to acenter point of the game screen 50.

Further, for example, like an area 50 a, the vicinity of a left endportion of the game screen 50 is displayed in black. The width and theposition of the area 50 a are determined based, for example, on thedistance L and the direction D between the representative point 71 andthe waist P10 of the player 100. It seems to the player 100 that nothingis displayed in the area 50 a located in the vicinity of the left endportion of the game screen 50. In this case, it is conceivable that theplayer 100 will move to their left, trying to move the display positionof the game character 51 back to the original position. Thus, accordingto the game screen 50, it is possible to guide the player 100 to theinside of the determination subject space 70.

By performing the display control of the game screen 50 as describedabove, it is possible to notify the player 100 that their standingposition is displaced, without changing the relative positions ofrespective images (game character 51 and the like) contained in the gamescreen 50. Here, the description above is directed to the case where theposition of the virtual camera is changed. However, the notification ofthe standing position of the player 100 may be performed by changing theangle of view or the line-of-sight of the virtual camera.

2-2. Second Modified Example

Further, the game screen 50 only needs to show the positional relationbetween the display positions of the standing position of the player 100and the representative point 71 of the determination subject space 70,and thus the example of the game screen 50 is not limited to the exampleof this embodiment.

FIG. 22 is a diagram illustrating another example of the game screen 50.On the game screen 50 illustrated in FIG. 22, a player character 51 a(first game character) corresponding to the player 100 and an instructorcharacter 51 b (second game character) are displayed.

In this case, for example, the player 100 moves their body according tothe movement of the instructor character 51 b. Then, based on themovement of the player 100, the player character 51 a performs anaction. Similarly to the embodiment, in a case where the player 100 hassucceeded in performing the action, the message 54 such as “GOOD” isdisplayed.

Alternatively, the player character 51 a and the instructor character 51b may move in the same manner, and the player 100 may move their bodyaccording to the movement of the player character 51 a and theinstructor character 51 b.

In the second modified example, the positional relation between theplayer character 51 a and the instructor character 51 b is changed basedon the positional relation between the position of the player 100 andthe determination subject space 70. For example, in the case where theposition of the player 100 is contained in the determination subjectspace 70, the player character 51 a is displayed substantially in frontof the instructor character 51 b as illustrated in FIG. 22.

On the other hand, for example, in the case where the position of theplayer 100 is out of the determination subject space 70 as illustratedin FIG. 10, the player character 51 a is displayed at a positiondisplaced far from the instructor character 51 b as illustrated in FIG.23, for example. Further, the message 54 such as “CAUTION” is displayed.

Further, for example, in the case where the position of the player 100is out of the determination subject space 70 as illustrated in FIG. 12,the player character 51 a is displayed at a position significantlydisplaced sideways from the instructor character 51 b as illustrated inFIG. 24, for example.

In the second modified example, for example, processing similar to theprocessing of S102 of FIG. 19 is executed. Specifically, at least one ofthe display positions of the player character 51 a and the instructorcharacter 51 b is changed so that the positional relation between thedisplay position of the player character 51 a and the display positionof the instructor character Sib corresponds to the positional relationbetween the position of the player 100 and the representative point 71of the determination subject space 70.

For example, first, the three-dimensional coordinate of the waist P10 ofthe player 100 are referred to. Subsequently, a determination is made asto the positional relation between the three-dimensional coordinate ofthe waist P10 of the player 100 and the representative point 71 of thedetermination subject space 70. For example, a difference between thethree-dimensional coordinate of the waist P10 of the player 100 and therepresentative point 71 of the determination subject space 70 isacquired. Specifically, the direction D from the representative point 71of the determination subject space 70 toward the three-dimensionalcoordinate of the waist P10 of the player 100 and the distance Ltherebetween are acquired.

After that, the display position of the player character 51 a is changedso that the positional relation between the display position of theplayer character 51 a and the display position of the instructorcharacter 51 b corresponds to the positional relation between thethree-dimensional coordinate of the waist P10 of the player 100 and therepresentative point 71 of the determination subject space 70. Forexample, as illustrated in FIG. 23 and FIG. 24, the display position ofthe player character 51 a is changed from a basic position 56 set infront of the instructor character 51 b to a position 57 obtained byshifting the basic position 56 by the distance Ls corresponding to theabove-mentioned distance L in the direction Ds corresponding to theabove-mentioned direction D.

According to the second modified example, by referring to the positionalrelation between the player character 51 a and the instructor character51 b, the player 100 can recognize whether or not the position of thebody of the player 100 is out of the determination subject space 70. Asa result, in such a case where the standing position of the player 100has changed during the gameplay, the player 100 can know that theirstanding position has changed, and accordingly can adjust their ownstanding position. Therefore, the player 100 can play the game in arelatively safe place within the determination subject space 70.

Here, in the case where the position of the player character 51 a isdisplaced from the front of the instructor character 51 b or displacedfar from the instructor character 51 b, it is generally conceivable thatthe player 100 will try to set the position of the player character 51 ato the front of the instructor character 51 b.

Specifically, in the case where the position of the player character 51a is displaced from the front of the instructor character 51 b ordisplaced far from the instructor character 51 b, the player 100conceivably feels difficulty in imitating the movement of the instructorcharacter 51 b. Therefore, it is conceivable that the player 100 willunconsciously adjust their own standing position so that the position ofthe player character 51 a is set to the front of the instructorcharacter 51 b.

As described above, by controlling the positional relation between theplayer character 51 a and the instructor character 51 b, it is possibleto make the player 100 unconsciously adjust their own standing position.

In the second modified example, too, the display control as illustratedin FIG. 21 may be performed. Specifically, without changing the relativepositions of the player character 51 a and the instructor character 51b, the display positions of the player character 51 a and the instructorcharacter 51 b may be moved to the right-hand side, the left-hand side,or the like of the game screen 50. In this case, too, similarly to thecase illustrated in FIG. 21, by changing the position of the virtualcamera, for example, the display positions of the player character 51 aand the instructor character 51 b are changed as described above.

FIG. 25 is a diagram illustrating a case where the display position ofan image contained in the game screen 50 has been changed. The gamescreen 50 illustrated in FIG. 25 is displayed, for example, in the casewhere the player 100 has moved to the right-hand side of thedetermination subject space 70 with respect to the position detectingdevice 1. The position of the virtual camera is changed to the left, andthus, for example, the player character 51 a and the instructorcharacter 51 b located in the vicinity of the center of the game screen50 are moved to the right in relation to the center point of the gamescreen 50.

Further, for example, similarly to FIG. 21, the area 50 a is displayed.In this case, it is conceivable that the player 100 will move to theirleft so as to move the display positions of the player character 51 aand the instructor character 51 b back to the original positions. Thus,according to the game screen 50, it is possible to guide the player 100to the inside of the determination subject space 70.

2-3. Other Modified Examples

It should be noted that the present invention is not limited to theembodiment and the modified examples which are described above, and thatvarious modifications may be made as needed without departing from thegist of the present invention.

(1) For example, the three-dimensional position information indicatingthe position of the player 100 has been described by taking, as anexample, the data storage example illustrated in FIG. 5. However, thethree-dimensional position information transmitted from the positiondetecting device 1 may be any information as long as the informationallows the position (for example, standing position) of the player 100to be identified, and thus the data storage example is not limited tothe example of FIG. 5. Alternatively, for example, the three-dimensionalposition information may be such information that indicates a distanceand a direction from a reference point of the player 100 (for example, apoint corresponding to the head) to each part of the body.

(2) Further, for example, the description above has been given by takingthe example in which the position information generating means forgenerating the three-dimensional position information based on thephotographed image and the depth information (depth image) is includedin the position detecting device 1. However, the position informationgenerating means may be included in the game device 20. Specifically,the game device 20 may receive the photographed image and the depthimage from the position detecting device 1, to thereby generate thethree-dimensional position information based on those images.

(3) Further, for example, the description above has been given bytaking, as a method of analyzing the movement of the player 100 based onthe three-dimensional position information, the example in which acomparison is made between the action determination criterioninformation illustrated in FIG. 18 and the change amount, the changedirection, the change speed, etc. of the three-dimensional coordinate ofeach part of the player 100. The analysis method for the movement of theplayer 100 may be any method as long as the method is performed based onthe three-dimensional position information, and thus the analysis methodis not limited to the above-mentioned example. Alternatively, forexample, the movement of the player 100 may be analyzed based on valuesacquired by substituting the three-dimensional coordinates contained inthe three-dimensional position information into a predeterminedmathematical expression.

(4) Further, for example, in the case where a plurality of players 100play the game, such control may be performed that prevents thedetermination subject spaces 70 corresponding to the respective players100 from overlapping each other. For example, in a case where twoplayers 100 play the game, the three-dimensional position informationcontains sets of the three-dimensional coordinates for the two players.In a case where changing the determination subject space 70 so that therepresentative point 71 moves to the three-dimensional coordinate of thewaist P10 of one player 100 causes the changed determination subjectspace 70 to overlap the determination subject space 70 of the otherplayer 100, there is a risk that the two players will hit each other,and thus control may be performed so as to prevent such change.

Specifically, in the case where the game executed by the game device 20is played by a plurality of players 100, the determination subject spacechanging unit 88 may include means for inhibiting change in the casewhere changing the position of the determination subject space 70corresponding to one player 100 causes the changed determination subjectspace 70 to overlap the determination subject space 70 corresponding toanother player 100.

(5) Further, in the first modified example and the second modifiedexample, the reference points, which are referred to when the displaycontrol unit 90 controls the display position and which represent thepositional relation between the position of the player 100 and thedetermination subject space 70, are set to the three-dimensionalcoordinate of the waist P10 and the representative point 71,respectively. The display control unit 90 only needs to determinewhether or not to control the display position based on thethree-dimensional position information corresponding to the player 100and information identifying the position of the determination subjectspace 70, and thus information items to be compared are not limited tothe above-mentioned example. For example, a comparison may be madebetween an average value of sets of the three-dimensional coordinatescontained in the three-dimensional position information and onearbitrary point within the determination subject space 70.

(6) Further, in this embodiment, the method of measuring the depth ofthe player 100 has been described by taking, as an example, the case ofperforming calculation based on the TOF of the infrared light. However,the measuring method is not limited to the example of this embodiment.Alternatively, for example, a method of performing triangulation, amethod of performing three-dimensional laser scanning, or the like maybe applied. Further, the description has been given by taking theexample in which the depth information is acquired as the depth image,but the depth information is not limited thereto. The depth informationmay be any information as long as the information allows the depth ofthe player 100 to be identified, and hence the depth information may bea value indicating the TOF, for example.

(7) Further, the determination subject space 70 has been described bytaking, as an example, the shape illustrated in FIG. 7, but the shape ofthe determination subject space 70 is not limited thereto. Thedetermination subject space 70 may have any shape as long as the shapeallows the position at which the player 100 should be standing to beidentified, and hence the determination subject space 70 may have aspherical shape, for example. In this case, the game data storage unit80 stores the representative point 71 of the determination subject space70 (for example, center point of the sphere) and information foridentifying the radius of the sphere.

(8) Further, in this embodiment, only the position of the determinationsubject space 70 is changed with the size thereof kept as it is.However, by changing the size of the determination subject space 70, theposition of the determination subject space 70 may be changed.Specifically, in the case where the state in which the player 100 is outof the determination subject space 70 has continued for thepredetermined time period, the position of the determination subjectspace 70 may be changed in such a manner that the determination subjectspace 70 is enlarged in a direction in which the player 100 is out ofthe determination subject space 70.

(9) Further, for example, in this embodiment, the game device 20 makes adetermination as to the movement of the player 100 based on thethree-dimensional position information. However, the position detectingdevice 1 may make a determination as to the movement of the player 100.In this case, the determination criterion information (FIG. 18) isstored in the position detecting device 1. Specifically, a determinationis made as to the movement of the player 100 by the position detectingdevice 1, and only information indicating a result of the determinationis transmitted to the game device 20.

(10) Further, in the case where the player 100 is out of thedetermination subject space 70, the display control processing performedby the display control unit 90 is not limited to this embodiment and themodified examples (FIG. 11, FIG. 13, FIG. 21, FIG. 23, FIG. 24, and FIG.25). It is only necessary to perform such display control that notifiesthe player 100 that the player 100 is out of the determination subjectspace 70. For example, the entire determination subject space 70 maycorrespond to the entire display area of the game screen 50.Specifically, in the case where the player 100 is out of thedetermination subject space 70, the game character 51 may be madeinvisible on the game screen 50.

(11) Alternatively, for example, in the case where the player 100 is notin the determination subject space 70, the display control unit 90 mayperform predetermined image processing on an image contained in the gamescreen 50. Specifically, for example, noise processing may be performedon the game character 51, which is a focus target of the player 100, tothereby make the game character 51 less visible.

(12) Further, in this embodiment, the dance game has been described asan example of the game to be executed on the game device 20. The game tobe executed on the game device 20 may be any game as long as themovement of the player 100 is detected to execute the game processing,and thus the kind of the game to be executed is not limited thereto.Alternatively, for example, the game may be a sport game such as asoccer game, a fighting game, or the like.

While there have been described what are at present considered to becertain embodiments of the invention, it will be understood that variousmodifications may be made thereto, and it is intended that the appendedclaims cover all such modifications as fall within the true spirit andscope of the invention.

1. A game device, comprising: position acquiring means for acquiring,from position information generating means, three-dimensional positioninformation relating to a position of a player in a three-dimensionalspace, the position information generating means generating thethree-dimensional position information based on a photographed imageacquired from photographing means for photographing the player and depthinformation relating to a distance between a measurement referenceposition of depth measuring means and the player; determination meansfor determining whether or not the position of the player in thethree-dimensional space is contained in a determination subject space;game processing execution means for executing game processing based on aresult of the determination made by the determination means; anddetermination subject space changing means for changing, in a case whereit is determined that the position of the player in thethree-dimensional space is not contained in the determination subjectspace, a position of the determination subject space based on theposition of the player in the three-dimensional space.
 2. The gamedevice according to claim 1, wherein the determination subject spacechanging means comprises: means for determining whether or not a statein which the position of the player in the three-dimensional space isnot contained in the determination subject space has continued for areference period; and means for changing the position of thedetermination subject space in a case where the state in which theposition of the player in the three-dimensional space is not containedin the determination subject space has continued for the referenceperiod.
 3. The game device according to claim 1, further comprisingdisplay control means for causing display means to display a game screencontaining a game character and a focused area having lightness thereofset higher than lightness of another area, wherein the display controlmeans comprises means for controlling a positional relation between adisplay position of the game character and a display position of thefocused area based on a positional relation between the position of theplayer in the three-dimensional space and the determination subjectspace.
 4. The game device according to claim 1, further comprisingdisplay control means for causing display means to display a game screencontaining a first game character and a second game character, whereinthe display control means comprises means for controlling a positionalrelation between a display position of the first game character and adisplay position of the second game character based on a positionalrelation between the position of the player in the three-dimensionalspace and the determination subject space.
 5. A control method for agame device, comprising: a position acquiring step of acquiring, fromposition information generating means, three-dimensional positioninformation relating to a position of a player in a three-dimensionalspace, the position information generating means generating thethree-dimensional position information based on a photographed imageacquired from photographing means for photographing the player and depthinformation relating to a distance between a measurement referenceposition of depth measuring means and the player; a determination stepof determining whether or not the position of the player in thethree-dimensional space is contained in a determination subject space; agame processing execution step of executing game processing based on aresult of the determination made in the determination step; and adetermination subject space changing step of changing, in a case whereit is determined that the position of the player in thethree-dimensional space is not contained in the determination subjectspace, a position of the determination subject space based on theposition of the player in the three-dimensional space.
 6. Anon-transitory computer-readable information storage medium having aprogram recorded thereon, the program causing a computer to function asa game device comprising: position acquiring means for acquiring, fromposition information generating means, three-dimensional positioninformation relating to a position of a player in a three-dimensionalspace, the position information generating means generating thethree-dimensional position information based on a photographed imageacquired from photographing means for photographing the player and depthinformation relating to a distance between a measurement referenceposition of depth measuring means and the player; determination meansfor determining whether or not the position of the player in thethree-dimensional space is contained in a determination subject space;game processing execution means for executing game processing based on aresult of the determination made by the determination means; anddetermination subject space changing means for changing, in a case whereit is determined that the position of the player in thethree-dimensional space is not contained in the determination subjectspace, a position of the determination subject space based on theposition of the player in the three-dimensional space.